const Schema = require('mongoose').Schema;

// #region config
module.exports = {
  webpackDevServerProxy: {
    '/api/v2': {
      logLevel: 'debug',
      changeOrigin: true,
      target: 'https://console-dev1.scanv.com',
      headers: {
        host: 'console-dev1.scanv.com',
      },
    },
  },
  "plugins": [
    "@kuiper/redis",
    "@kuiper/mongo",
    "@kuiper/react-base",
    "@kuiper/graphql",
    "@kuiper/auth",
    "@kuiper/notification",
    "@cloud-monitor/web"
  ],
  "@kuiper/graphql": {
    "devToken": ""
  },
  "@kuiper/react-base": {
    __browser: {
      navDirection: 'topLeft',
      logo: {
        title: 'ScanV',
        icon:
          'data:img/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAsCAYAAAAjFjtnAAAAAXNSR0IArs4c6QAACdtJREFUaAXtGW1wVNX1nPt287nZTdKAgFD5CrsbR60DtGqxgjhTptOxFItSoWgtM2LbIbshAcWx7jCULwm7gY4fQ20ZsUrRDgUKyFf9Am1FtEyHZDeBKvJVGgjZbALJ7nv39txN3rK7eW+zIeif9s28efedc+6599x7vu65WFQZdEbqXCEY4FO2KlgUPYeTAPkYAWwoB3UogmIDEK0oIMwAWoDhcWseP3hhecW5AQ4HxZ7PilWLloM2T3CDguKNsN+9t79MJ/uE5Ug4OJsL8RAIGAIM9tO7D7n1bL7FcnFw4ciWvKEgmoInbgIeG6OhcCPADwWgAxG2MbDVtflHtPR33LJFwWGdUf76hGL3VLR562cJDq8gg7nt/orN2TKjnbufo1hKK3tAUXLXtdaOPplt39JFTcNjXbHZHPBxRHzZXmz3n/UNu5xN/6KqhnGcwx7a2fc7AhVzsWTxCUe0s6sZEBValcp2v/s3mRjZqo8PFmpsEwhxKjfX6mtZXX46E30mnN17qpSLdp8Q4gfMosyO1DoPZqJ3eIMTNC52CRCDGIMZEX/FVtpRAJunfp8QcJ9sI8OlJMSzsp3+FFYHb8WY2MRQLGkLVOxMx1/rv31haKKm8S0MxK8jgYrfGvEp9Dbeh1zdKmi6tNhXHMWOMrlrpAHywe3dX9oYLn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L2ovEy8Iw1VYPkfHfQVH3qMvtmpicF9m9x8dyoc6lROcBSiVWhv3jXs1kG/qYRt9rFkBnRjc899LZeDbp+CSq4H1EZ+rDqIh/aZpCcmlbLMB+SjczdP8AZTThu8iSKVbA51Tff9MBti2n/SOu6Lyu5TtgAfRBpXssq250dnH1VuCshJyNQ0McS16imXE8zxV+nu5QzhQM6fz0fM1tHXq//3//51fga97QjfK2Ul8Ie019+WTf2/F/R3VwVNwj9SDlxaBe5abLxZ/rfQbyzSqQZRqAjlwPfhxueFbSyDjBo7Dzk/Dg+AFHi/FF5F1K5EFG4hXMfS/W1fWczdPgA8GCEjbQZ8AC0AnrMhltsywTRrXoEkoXnpeTotrpLXRj2IyMrecql5UFaA2MahWI8vR1z4Ri53sSNtBnwALICUQCzvWAWiX5/D8yZGGRR9kMBy8Jc1Fo/McEb5eFL0pD7iR4Gd3n1nwcDtYOdPLXpf+whaGyZEbDvcdKpQ3YvA336HB56yIDn7xbkJU5Cbd7Q99MvwnV6fvz/S+XxObKtUAsVwAAAABJRU5ErkJggg==',
      },
      theme: {
        '--color-h': 210,
        '--color-s': 90,
        '--color-l': 45,
        '--color-s-step': -5,
        '--color-l-step': 5,
        '--color-text-h': 228,
        '--color-text-s': 8,
        '--color-text-l': 20,
        '--color-text-step': 20,
        '--color-bg-h': 210,
        '--color-bg-s': 2,
        '--color-bg-l': 100,
        '--color-bg-s-step': 2,
        '--color-bg-l-step': -2,
        '--color-nav-bg-top': 'hsl(231, 8%, 18%)',
        '--color-nav-bg-left': 'hsl(223, 11%, 25%)',
        '--color-bg-left-submenu': 'hsl(223, 8%, 18%)',
        '--color-nav-text': 'hsl(216, 17%, 83%)',
        '--color-nav-bg-h': 209,
        '--color-nav-bg-s': 34,
        '--color-nav-bg-l': 12,
        '--color-nav-bg-s-step': 0,
        '--color-nav-bg-l-step': 4,
        '--color-nav-text-h': 0,
        '--color-nav-text-s': 0,
        '--color-nav-text-l': 100,
        '--color-nav-text-s-step': 0,
        '--color-nav-text-l-step': -10,
        '--color-border-s': 14,
        '--color-border-s-step': +3,
        '--color-border-l': 68,
        '--color-border-l-step': 4,
        '--color-error': '#F04038',
        '--color-warning': '#FAAF2C',
        '--color-success': '#11ab4e',
        '--shadow-1': '0 3px 3px 1px var(--color-text-5)',
        '--shadow-2': '0 3px 3px -1px var(--color-text-5)',
        '--shadow-3': '0 4px 4px -1px var(--color-text-5)',
      },
    },
  },
  "@kuiper/auth": {
    "cas": {
      "callback": "http://127.0.0.1:17894/api/auth/login/cas",
      server: ['https://test-sso.scanv.com'],
      secret: 'd41d8cd98f00b204e9800998ecf8427e'
    },
    userAdditionSchema: {
      balanceId: {
        type: Schema.Types.ObjectId,
        ref: 'Balance',
        default: null,
      },
      planId: { type: Schema.Types.ObjectId, ref: 'Plan', defualt: null },
      customerServiceRep: { type: String },
      disclaimerAgreeTime: { type: Date },
    },
    "__browser": {
      "welcome": "Welcome",
      "title": "ScanV MAX",
      "subtitle": null,
      "background": "",
      "authBackend": "cas",
      "casUrl": "https://test-sso.scanv.com",
    },
  },
  // 建议使用远程redis mongo
  "@kuiper/redis": {
    "db": 0,
    "host": "10.255.8.129",
    "port": 6379,
    "password": "9q.scphh",
    "showFriendlyErrorStack": true,
  },
  "@kuiper/mongo": {
    mongoUri:
      "mongodb://cake:<9q.scphh>@10.255.8.129:27017/cloudmonitor-dev2?authSource=admin",
    connectionOptions: {
      autoIndex: true,
    },
  },
  "@cloud-monitor/web": {
    serviceApi: 'https://console-dev1.scanv.com',
    docgenApi: 'http://127.0.0.1:8080/api/v1/docgen',
  },
};
// #endregion config
